#include "widget.h"
#include"mypushbutton.h"
#include "./ui_widget.h"
#include<QLabel>
#include<QFont>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    connect(ui->pushButton,&QPushButton::clicked,this,&Widget::handleClick);
}

Widget::~Widget()
{
    qDebug()<<"Widget析构函数";
    delete ui;
}

void Widget::handleClick()
{
    if(ui->pushButton->text()=="click me")
    {
        ui->pushButton->setText("hello qt");
    }
    else
    ui->pushButton->setText("click me");
}
